package com.yzkj.siot.controller;

import com.yzkj.siot.annotation.Permission;
import com.yzkj.siot.annotation.WebLog;
import com.yzkj.siot.base.BaseController;
import com.yzkj.siot.facade.SummaryFacade;
import com.yzkj.siot.type.ApiType;
import com.yzkj.siot.type.PermissionType;
import com.yzkj.siot.vo.SummaryIndexVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author skye
 * @since 2021-11-07
 */
@RestController
@RequestMapping("/summary")
public class SummaryController extends BaseController {

    @Autowired
    SummaryFacade facade;

    @WebLog(type = ApiType.READ)
    @Permission(type = PermissionType.TENANT)
    @GetMapping("index")
    public SummaryIndexVO index() {

        return facade.index();
    }
}

